<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

    <s:url action="listSerialInterface" id="descrsUrl"/>

    <div class="refreshBox">
       	<div class="refreshButton">
   			<s:a theme="ajax" notifyTopics="/refreshSerialInterface"><s:text name="serialInterface.main.refresh.button.text" /></s:a>
   		</div>
   		<s:div id="serialInterfaces" theme="ajax" href="%{descrsUrl}" loadingText="%{getText('serialInterface.main.refresh.loading.text')}" listenTopics="/refreshSerialInterface"/>
    </div>

    <br/>

	<div class="formBox">
		<p class="formTitle"><s:text name="serialInterface.main.form.title" /></p>
		<s:form action="saveSerialInterface" validate="true" theme="ajax">
		    <s:textfield id="si_id" name="serialInterface.id" cssStyle="display:none"/>
			<s:textfield id="si_port" label="%{getText('serialInterface.main.form.field.port.label')}" name="serialInterface.port"/>
			<s:textfield id="si_baudrate" label="%{getText('serialInterface.main.form.field.baudrate.label')}" name="serialInterface.baudrate"/>
			<s:textfield id="si_databits" label="%{getText('serialInterface.main.form.field.databits.label')}" name="serialInterface.databits"/>
			<s:textfield id="si_stopbits" label="%{getText('serialInterface.main.form.field.stopbits.label')}" name="serialInterface.stopbits"/>
			<s:textfield id="si_parity" label="%{getText('serialInterface.main.form.field.parity.label')}" name="serialInterface.parity"/>
			<s:textfield id="si_type" label="%{getText('serialInterface.main.form.field.type.label')}" name="serialInterface.type"/>
			<s:textfield id="si_active" label="%{getText('serialInterface.main.form.field.active.label')}" name="serialInterface.active"/>
			
			<s:submit theme="ajax" targets="serialInterfaces" notifyTopics="/saveSerialInterface,/serialInterfacePopulate"/>
		</s:form>
	</div>